package it.truestoryfactory.tsq.services.msg;

public class JoinMessage extends TSMessage {
	public static final String DEVICE_ADDRESS_TAG = "device_address";
	public static final String IP_ADDRESS_TAG = "ip_address";
	public static final String TYPE = "join";
	private String deviceAddress;
	private String ipAddress;
	
	@Override
	public String toXML() {
		
		return startMessageTag("join")+getDeviceAddressElem()+getIpAddressElem()+endMessageTag();
	}
	
	private String getIpAddressElem() {
		
		return "<ip_address>"+getIpAddress()+"</ip_address>";
	}

	private String getDeviceAddressElem() {
		
		return "<device_address>"+getDeviceAddress()+"</device_address>";
	}

	public String getDeviceAddress() {
		return deviceAddress;
	}
	public void setDeviceAddress(String deviceAddress) {
		this.deviceAddress = deviceAddress;
	}
	public String getIpAddress() {
		return ipAddress;
	}
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}
	
}
